home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / ODF / Other View Systems / PowerPlant PPob / PowerPlant Views.doc < prev   
Encoding:
Text File  |  1996-09-17  |  5.1 KB  |  132 lines  |  [TEXT/MPS ]

  1.             *************************************************
  2.             POWERPLANT VIEWS SUPPORT IN ODF 1 • RELEASE NOTES
  3.             *************************************************
  4.  
  5. These release notes cover the PowerPlant views support in ODF.  This is a technical
  6. complement to the ReadMe files "Q & A" and "User Guide" which should be read first.
  7. In particular the "User Guide" explains how to add PowerPlant support to your part
  8. and how to support custom classes.
  9.  
  10. PPOB READER MODULE
  11. ------------------
  12.  
  13. We call "PPob Reader" the code contained in the 2 source files FWPPobRd.cpp and
  14. FWPPobOb.cpp. ('PPob' is the resource type for PowerPlant views.)
  15.  
  16. FWPPobRd.cpp implements the static class FW_CPPobReader whose job is to parse
  17. the PPob resource stream, and for each view create a temporary object and then
  18. create the converted ODF view.  FWPPobOb.cpp implements the classes for these
  19. temporary objects, with a root class FW_CPPobView.
  20.  
  21. SUPPORTED POWERPLANT CLASSES
  22. ----------------------------
  23.  
  24. The following class conversion occurs when reading a PPob resource:
  25.  
  26. PowerPlant class        ODF class
  27. +++++++++++++++++++++++++++++++++++++++++++++
  28. LActiveScroller            FW_CScrollBarScroller
  29. LCaption                FW_CStaticText
  30. LDialogBox                (sets frame's bounds & default/cancel buttons)
  31. LEditText                FW_CEditView
  32. LGroupBox                FW_CGroupBox
  33. LListBox                FW_CListBox
  34. LPicture                FW_CPictSView
  35. LRadioGroup                FW_CRadioCluster
  36. LRadioCluster            FW_CRadioCluster
  37. LScroller                FW_CScrollBarScroller
  38. LStdButton                FW_CButton
  39. LStdCheckBox            FW_CButton
  40. LStdPopupMenu            FW_CPopupMenu
  41. LStdRadioButton            FW_CButton
  42. LTabGroup                FW_CViewTabber
  43. LTextEdit                FW_CEditView
  44. LView                    FW_CSuperView
  45. LWindow                    (sets frame's bounds & creates grow box)
  46.  
  47. All other classes are not registered in FW_CPPobReader::RegisterAllPPClasses()
  48. and thus will be converted to ODF "unknown" views by default, unless your
  49. part registers them and provides the code to convert them.
  50.  
  51. Note: it is not possible to create pure LPane or LStdControl views.
  52.  
  53. CONVERSION RULES & LIMITATIONS
  54. ------------------------------
  55.  
  56. ODF views are restricted to 16-bit coordinates. When reading coordinates or 
  57. sizes greater than 16-bit the PPob reader gives a debugger warning:
  58.   "PPobReader Warning: view imageSize is too big. ODF will adjust its extent."
  59. or
  60.   "PPobReader Warning: found a view out of 16 bit space. ODF will adjust its bounds."
  61. It resets large coordinates to 0 and large sizes to 16K.
  62.  
  63. Menus built with Constructor are not supported. You must still define your menu
  64. resources in a menu.fr file.
  65.  
  66. LAttachment classes are not supported.  Currently they are interpreted as views
  67. with large coordinates because some invalid data is read.  But this allows to
  68. display them as unknown views...
  69.  
  70.  
  71. LPane classes have the following conversion rules and limitations:
  72. (class fields are named as they appear in the Constructor's class editors)
  73.  
  74. • LPane fields:
  75. Binding flags and Pane ID are converted.
  76. User Constant field, Enabled and Visible flags are ignored.
  77.  
  78. • LView fields:
  79. Scroll Unit and Scroll Position are ignored.  
  80. When an LView object is a scroller's scrolling view its bounds are changed to
  81. match the scroller's bounds (minus the scroll bars) and its binding flags are
  82. set the the scroller's binding flags.
  83.  
  84. • LScroller fields:
  85. An ODF frame can use only one scrolling view for its content (the content view).  
  86. The first scrolling view is converted into the content view and additional 
  87. scrollers generate a warning and are ignored by ODF. (However you can handle 
  88. scrolling views as custom views like CScrollEdit in Form.)
  89. The LScroller object itself is converted into an ODF FW_CScrollBarScroller and
  90. 1 or 2 scroll bar views are created. Their view id is hard-coded to 'horz' and
  91. 'vert'.
  92.  
  93. • LStdControl fields:
  94. Title, Value Message, Initial Value and Text Traits are converted.
  95. Control Ref Con is ignored.
  96. IMPORTANT: the Value Message should be the ODF value. For instance a button should
  97. use -10 (FW_kButtonPressedMsg) if you want to use the default ODF notification.
  98. Of course you can also use your own message values.
  99.  
  100. • LWindow fields:
  101. The only data converted from an LWindow object is its location and the presence
  102. of a grow box. (A grow box is always created in the bottom right corner of the 
  103. frame and its view id is hard-coded to 'grow'.) The type of window cannot be 
  104. used here because the frame's window already exists when its subviews are created.
  105.  
  106. • LDialogBox fields:
  107. Same as LWindow + the default and cancel button ids.  The type of dialog window
  108. must be set by program in NewModalDialog().
  109.  
  110. • LListBox fields:
  111. Horizontal Scrollbar and LDEF ID are not supported.
  112. The "Has Grow Box" flag is translated into "Multiple Selection" for ODF.
  113.  
  114. • LEditField fields:
  115. Key filter is not supported.
  116.  
  117. • LTextEdit fields:
  118. This class is mapped to the same ODF FW_CEditView class as LEditField... because
  119. ODF doesn't have any built-in scrolling text class yet.
  120. However Form provides an example for converting it to a custom CScrollEdit class.
  121.  
  122. • LPicture fields:
  123. The image size should remain 0, 0 in order to use the picture size by default.
  124. The PICT resource must be present in the same resource file.
  125.  
  126.  
  127. API REFERENCE
  128. -------------
  129.  
  130. <To be documented later>
  131. Please see the User Guide and the code in Form and ViewTester.
  132.